package group.raber.base.model;

import group.raber.saber.model.NodeEntry;

import java.util.Date;

/**
 * 菜单项
 * Created by tisir<yangsong158@qq.com> on 2017-06-06
 */
public class MenuItem extends NodeEntry {
    public static final String KEY_ID = "id";
    public static final String KEY_CODE = "code";
    public static final String KEY_NAME = "name";
    public static final String KEY_SORT_CODE = "sortCode";
    public static final String KEY_ACTION = "action";
    public static final String KEY_PARAMETER = "parameter";
    public static final String KEY_ACCESS_TYPE = "accessType";
    public static final String KEY_ICON = "icon";
    public static final String KEY_STATUS = "status";
    public static final String KEY_REVISION = "revision";
    public static final String KEY_CREATED_BY = "createdBy";
    public static final String KEY_CREATED_TIME = "createdTime";
    public static final String KEY_UPDATED_BY = "updatedBy";
    public static final String KEY_UPDATED_TIME = "updatedTime";

    public Long getId() {
        return xGet(KEY_ID).longValue();
    }

    public MenuItem setId(Long id) {
        xPut(KEY_ID,id);
        return this;
    }

    public String getCode() {
        return xGet(KEY_CODE).strValue();
    }

    public MenuItem setCode(String code) {
        xPut(KEY_CODE,code);
        return this;
    }

    public String getName() {
        return xGet(KEY_NAME).strValue();
    }

    public MenuItem setName(String name) {
        xPut(KEY_NAME,name);
        return this;
    }

    public String getSortCode() {
        return xGet(KEY_SORT_CODE).strValue();
    }

    public MenuItem setSortCode(String sortCode) {
        xPut(KEY_SORT_CODE,sortCode);
        return this;
    }

    public String getAction() {
        return xGet(KEY_ACTION).strValue();
    }

    public MenuItem setAction(String action) {
        xPut(KEY_ACTION,action);
        return this;
    }

    public String getParameter() {
        return xGet(KEY_PARAMETER).strValue();
    }

    public MenuItem setParameter(String parameter) {
        xPut(KEY_PARAMETER,parameter);
        return this;
    }

    public String getAccessType() {
        return xGet(KEY_ACCESS_TYPE).strValue();
    }

    public MenuItem setAccessType(String accessType) {
        xPut(KEY_ACCESS_TYPE,accessType);
        return this;
    }

    public String getIcon() {
        return xGet(KEY_ICON).strValue();
    }

    public MenuItem setIcon(String icon) {
        xPut(KEY_ICON,icon);
        return this;
    }

    public String getStatus() {
        return xGet(KEY_STATUS).strValue();
    }

    public MenuItem setStatus(String status) {
        xPut(KEY_STATUS,status);
        return this;
    }

    public Integer getRevision() {
        return xGet(KEY_REVISION).intValue();
    }

    public MenuItem setRevision(Integer revision) {
        xPut(KEY_REVISION,revision);
        return this;
    }

    public Integer getCreatedBy() {
        return xGet(KEY_CREATED_BY).intValue();
    }

    public MenuItem setCreatedBy(Integer createdBy) {
        xPut(KEY_CREATED_BY,createdBy);
        return this;
    }

    public Date getCreatedTime() {
        return xGet(KEY_CREATED_TIME).dateValue();
    }

    public MenuItem setCreatedTime(Date createdTime) {
        xPut(KEY_CREATED_TIME,createdTime);
        return this;
    }

    public Integer getUpdatedBy() {
        return xGet(KEY_UPDATED_BY).intValue();
    }

    public MenuItem setUpdatedBy(Integer updatedBy) {
        xPut(KEY_UPDATED_BY,updatedBy);
        return this;
    }

    public Date getUpdatedTime() {
        return xGet(KEY_UPDATED_TIME).dateValue();
    }

    public MenuItem setUpdatedTime(Date updatedTime) {
        xPut(KEY_UPDATED_TIME,updatedTime);
        return this;
    }
}
